<?php

class RepairerForm extends CFormModel {

    public $userName;
    public $userPhone;
    public $city;
    public $courier;
    public $userMsg;
    public $userAddress;
    public $userEmail;

    /**
     * Declares the validation rules.
     * The rules state that username and userPhone are required,
     * and password needs to be authenticated.
     */
    public function rules() {
        return array(
            array('userName, userPhone', 'required'),
            array('userAddress', 'required', 'on' => 'courierCh'),
            array('city, courier, userAddress, userMsg', 'default'),
            array('userEmail', 'email'),
        );
    }

    /**
     * Declares attribute labels.
     */
    public function attributeLabels() {
        return array(
            'courier' => 'Нужен бесплатный курьер',
        );
    }

}
